const router        = require('koa-router'),
      GoodsService  = require('../service/goods.service'),
      SchoolService = require('../service/school.service');

const route = router();

route.get('/', function *() {
    var goods, school;

    school = yield SchoolService.school();
    goods = yield GoodsService.all();

    yield this.render('index', {
        school: school,
        goods : goods
    });
});

module.exports = route;